package com.sumainfor.pc.dev.controller;

import com.sumainfor.common.util.JsonResult;
import com.sumainfor.pc.dev.service.RaidersHousingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

/**
 * <p>
 * 租房攻略-房源中间表
 * <p>
 *
 * @author: zhoucong
 * @create: 2019-05-09 20:00
 **/
@Controller
@RequestMapping("/raidersHousing")
public class RaidersHousingController {

    @Autowired
    RaidersHousingService raidersHousingService;

    /**
    * <p>
    * 获取租房攻略-房源中间表
    * </p>
    *
    * @author: zhoucong
    * @since:
    */
    @ResponseBody
    @PostMapping("/getRaidersHousing")
    public JsonResult getRaidersHousing(@RequestBody Map<String,Object> params){
        return raidersHousingService.getRaidersHousing(params);
    }

    /**
    * <p>
    * 新增租房攻略-房源中间表
    * </p>
    *
    * @author: zhoucong
    * @since:
    */
    @ResponseBody
    @PostMapping("/insertRaidersHousing")
    public JsonResult insertRaidersHousing(@RequestBody Map<String,Object> params){
        return raidersHousingService.insertRadHou(params);
    }

    /**
    * <p>
    * 删除租房攻略-房源中间表
    * </p>
    *
    * @author: zhoucong
    * @since:
    */
    @ResponseBody
    @PostMapping("/deleteRaidersHousing")
    public JsonResult deleteRaidersHousing(@RequestBody Map<String,Object> params){
        return raidersHousingService.deleteRaidersHousing(params);
    }

}
